/**
 * Created by Administrator on 2017/9/11/0011.
 */
require.config({
    baseUrl:"script/module"
});
require(['userHandler'],function (userHandler) {

    var userName = document.getElementById("user-name"),
        password = document.getElementById("password"),
        submit = document.getElementById("submit"),
        checkIn = document.getElementById("check-in"),
        courseId = document.getElementById("course-id");

        studentHandler = new userHandler.StudentHandler();

    submit.addEventListener("click",function (e) {
        studentHandler.login({
            username:userName.value,
            password:password.value
        },function () {

        });
    });

    checkIn.addEventListener("click",function (e) {
        studentHandler.checkIn(Number(courseId.value),function () {
        })
    })
})